<?php
namespace App\Admin\Renderable;

use App\Models\User;
use Dcat\Admin\Grid;
use Dcat\Admin\Grid\LazyRenderable;

class UserTable extends LazyRenderable
{
    public function grid(): Grid
    {
        return Grid::make(new User(), function (Grid $grid) {
            $grid->column('id');
            $grid->column('nickname');
            $grid->column('name');
            $grid->column('phone');

            $grid->quickSearch(['username', 'name']);

            $grid->paginate(10);
            $grid->disableActions();
        });
    }
}
